package com.beiming.libra.domain;


import com.beiming.libra.common.utils.CommonsUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class UserMessage extends BaseObject {

  public UserMessage() {
  }

  public UserMessage(String caseId, String receiverId,
      String messageTitle, String messageContent) {
    super.setId(CommonsUtils.get32BitUUID());
    this.caseId = caseId;
    this.receiverId = receiverId;
    this.read = "0";
    this.messageType = "1";
    this.messageTitle = messageTitle;
    this.messageContent = messageContent;
  }
  /**
   * 仲裁申请表id
   */
  @ApiModelProperty(value = "案件id", hidden = false)
  private String caseId;


  /**
   *文书类型
   */
  @ApiModelProperty(value = "文书类型", hidden = false)
  private String docType;
  /**
   * 接收人id
   */
  @ApiModelProperty(value = "接收人id", hidden = false)
  private String receiverId;

  /**
   * 已读未读 0:未读 1：已读
   */
  @ApiModelProperty(value = "已读未读 0:未读 1：已读", hidden = false)
  private String read;

  /**
   * 消息类型   0：送达文件消息 1:普通消息
   */
  @ApiModelProperty(value = "消息类型   0：送达文件消息 1:普通消息", hidden = false)
  private String messageType;

  /**
   * 消息标题
   */
  @ApiModelProperty(value = "消息标题", hidden = false)
  private String messageTitle;

  /**
   * 消息内容
   */
  @ApiModelProperty(value = "消息内容", hidden = false)
  private String messageContent;

//================分页信息==========================
  /**
   * 每页条数
   */
  @ApiModelProperty(value = "每页条数", required = false, hidden = false)
  private Integer pageSize;


  /**
   * 第几页
   */
  @ApiModelProperty(value = "第几页", required = false, hidden = false)
  private Integer pageNo;

  /**
   * 排序字段
   */
  @ApiModelProperty(hidden = true)
  private String sortField;

  /**
   * 升序，降序
   */
  @ApiModelProperty(hidden = true)
  private String direction;

  public Integer getPageSize() {
    if (pageSize == null) {
      this.pageSize = 10;
    }
    return pageSize;
  }

  public void setPageSize(Integer pageSize) {
    this.pageSize = pageSize;
  }

  public Integer getPageNo() {
    if (pageNo == null) {
      this.pageNo = 1;
    }
    return pageNo;
  }

  @Override
  public String toString() {
    return "QueryPageParam [pageSize=" + pageSize + ", pageNo=" + pageNo + ", sortField="
        + sortField + ", direction=" + direction + "]";
  }


}